package com.laf.LAF.domain.user;

import com.laf.LAF.domain.user.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface UserRepository extends JpaRepository<User, Long> {

    User findByUsername(String username);

    User findByUsernameAndAge(String username, Integer age);

    @Query("from User u where u.username=:username")
    User findUser(@Param("username") String username);


}